/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.sirius.ms.sdk.model.BasicSpectrum;
import io.sirius.ms.sdk.model.PeakPair;
import io.sirius.ms.sdk.model.SpectralMatchType;
import io.sirius.ms.sdk.model.SpectrumType;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * SpectralLibraryMatch
 */
@JsonPropertyOrder({
  SpectralLibraryMatch.JSON_PROPERTY_SPEC_MATCH_ID,
  SpectralLibraryMatch.JSON_PROPERTY_RANK,
  SpectralLibraryMatch.JSON_PROPERTY_SIMILARITY,
  SpectralLibraryMatch.JSON_PROPERTY_SHARED_PEAKS,
  SpectralLibraryMatch.JSON_PROPERTY_SHARED_PEAK_MAPPING,
  SpectralLibraryMatch.JSON_PROPERTY_QUERY_SPECTRUM_INDEX,
  SpectralLibraryMatch.JSON_PROPERTY_DB_NAME,
  SpectralLibraryMatch.JSON_PROPERTY_DB_ID,
  SpectralLibraryMatch.JSON_PROPERTY_UUID,
  SpectralLibraryMatch.JSON_PROPERTY_SPLASH,
  SpectralLibraryMatch.JSON_PROPERTY_MOLECULAR_FORMULA,
  SpectralLibraryMatch.JSON_PROPERTY_ADDUCT,
  SpectralLibraryMatch.JSON_PROPERTY_EXACT_MASS,
  SpectralLibraryMatch.JSON_PROPERTY_SMILES,
  SpectralLibraryMatch.JSON_PROPERTY_TYPE,
  SpectralLibraryMatch.JSON_PROPERTY_INCHI_KEY,
  SpectralLibraryMatch.JSON_PROPERTY_REFERENCE_SPECTRUM_TYPE,
  SpectralLibraryMatch.JSON_PROPERTY_REFERENCE_SPECTRUM,
  SpectralLibraryMatch.JSON_PROPERTY_QUERY_SPECTRUM_TYPE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class SpectralLibraryMatch {
  public static final String JSON_PROPERTY_SPEC_MATCH_ID = "specMatchId";
  @jakarta.annotation.Nullable
  private String specMatchId;

  public static final String JSON_PROPERTY_RANK = "rank";
  @jakarta.annotation.Nullable
  private Integer rank;

  public static final String JSON_PROPERTY_SIMILARITY = "similarity";
  @jakarta.annotation.Nonnull
  private Float similarity;

  public static final String JSON_PROPERTY_SHARED_PEAKS = "sharedPeaks";
  @jakarta.annotation.Nullable
  private Integer sharedPeaks;

  public static final String JSON_PROPERTY_SHARED_PEAK_MAPPING = "sharedPeakMapping";
  @jakarta.annotation.Nullable
  private List<PeakPair> sharedPeakMapping = new ArrayList<>();

  public static final String JSON_PROPERTY_QUERY_SPECTRUM_INDEX = "querySpectrumIndex";
  @jakarta.annotation.Nonnull
  private Integer querySpectrumIndex;

  public static final String JSON_PROPERTY_DB_NAME = "dbName";
  @jakarta.annotation.Nullable
  private String dbName;

  public static final String JSON_PROPERTY_DB_ID = "dbId";
  @jakarta.annotation.Nullable
  private String dbId;

  public static final String JSON_PROPERTY_UUID = "uuid";
  @jakarta.annotation.Nonnull
  private Long uuid;

  public static final String JSON_PROPERTY_SPLASH = "splash";
  @jakarta.annotation.Nullable
  private String splash;

  public static final String JSON_PROPERTY_MOLECULAR_FORMULA = "molecularFormula";
  @jakarta.annotation.Nullable
  private String molecularFormula;

  public static final String JSON_PROPERTY_ADDUCT = "adduct";
  @jakarta.annotation.Nullable
  private String adduct;

  public static final String JSON_PROPERTY_EXACT_MASS = "exactMass";
  @jakarta.annotation.Nullable
  private Double exactMass;

  public static final String JSON_PROPERTY_SMILES = "smiles";
  @jakarta.annotation.Nullable
  private String smiles;

  public static final String JSON_PROPERTY_TYPE = "type";
  @jakarta.annotation.Nullable
  private SpectralMatchType type = SpectralMatchType.IDENTITY;

  public static final String JSON_PROPERTY_INCHI_KEY = "inchiKey";
  @jakarta.annotation.Nonnull
  private String inchiKey;

  public static final String JSON_PROPERTY_REFERENCE_SPECTRUM_TYPE = "referenceSpectrumType";
  @jakarta.annotation.Nullable
  private SpectrumType referenceSpectrumType;

  public static final String JSON_PROPERTY_REFERENCE_SPECTRUM = "referenceSpectrum";
  @jakarta.annotation.Nullable
  private BasicSpectrum referenceSpectrum;

  public static final String JSON_PROPERTY_QUERY_SPECTRUM_TYPE = "querySpectrumType";
  @jakarta.annotation.Nullable
  private SpectrumType querySpectrumType;

  public SpectralLibraryMatch() {
  }

  public SpectralLibraryMatch specMatchId(@jakarta.annotation.Nullable String specMatchId) {
    
    this.specMatchId = specMatchId;
    return this;
  }

  /**
   * Get specMatchId
   * @return specMatchId
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SPEC_MATCH_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getSpecMatchId() {
    return specMatchId;
  }


  @JsonProperty(JSON_PROPERTY_SPEC_MATCH_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSpecMatchId(@jakarta.annotation.Nullable String specMatchId) {
    this.specMatchId = specMatchId;
  }

  public SpectralLibraryMatch rank(@jakarta.annotation.Nullable Integer rank) {
    
    this.rank = rank;
    return this;
  }

  /**
   * Get rank
   * @return rank
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_RANK)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getRank() {
    return rank;
  }


  @JsonProperty(JSON_PROPERTY_RANK)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRank(@jakarta.annotation.Nullable Integer rank) {
    this.rank = rank;
  }

  public SpectralLibraryMatch similarity(@jakarta.annotation.Nonnull Float similarity) {
    
    this.similarity = similarity;
    return this;
  }

  /**
   * Similarity between query and reference spectrum
   * @return similarity
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_SIMILARITY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Float getSimilarity() {
    return similarity;
  }


  @JsonProperty(JSON_PROPERTY_SIMILARITY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setSimilarity(@jakarta.annotation.Nonnull Float similarity) {
    this.similarity = similarity;
  }

  public SpectralLibraryMatch sharedPeaks(@jakarta.annotation.Nullable Integer sharedPeaks) {
    
    this.sharedPeaks = sharedPeaks;
    return this;
  }

  /**
   * Number of shared/matched peaks
   * @return sharedPeaks
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SHARED_PEAKS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getSharedPeaks() {
    return sharedPeaks;
  }


  @JsonProperty(JSON_PROPERTY_SHARED_PEAKS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSharedPeaks(@jakarta.annotation.Nullable Integer sharedPeaks) {
    this.sharedPeaks = sharedPeaks;
  }

  public SpectralLibraryMatch sharedPeakMapping(@jakarta.annotation.Nullable List<PeakPair> sharedPeakMapping) {
    
    this.sharedPeakMapping = sharedPeakMapping;
    return this;
  }

  public SpectralLibraryMatch addSharedPeakMappingItem(PeakPair sharedPeakMappingItem) {
    if (this.sharedPeakMapping == null) {
      this.sharedPeakMapping = new ArrayList<>();
    }
    this.sharedPeakMapping.add(sharedPeakMappingItem);
    return this;
  }

  /**
   * List of paired/matched peak indices.   Maps indices of peaks from the query spectrum (mass sorted)  to indices of matched peaks in the reference spectrum (mass sorted)
   * @return sharedPeakMapping
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SHARED_PEAK_MAPPING)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<PeakPair> getSharedPeakMapping() {
    return sharedPeakMapping;
  }


  @JsonProperty(JSON_PROPERTY_SHARED_PEAK_MAPPING)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSharedPeakMapping(@jakarta.annotation.Nullable List<PeakPair> sharedPeakMapping) {
    this.sharedPeakMapping = sharedPeakMapping;
  }

  public SpectralLibraryMatch querySpectrumIndex(@jakarta.annotation.Nonnull Integer querySpectrumIndex) {
    
    this.querySpectrumIndex = querySpectrumIndex;
    return this;
  }

  /**
   * Get querySpectrumIndex
   * @return querySpectrumIndex
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_QUERY_SPECTRUM_INDEX)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Integer getQuerySpectrumIndex() {
    return querySpectrumIndex;
  }


  @JsonProperty(JSON_PROPERTY_QUERY_SPECTRUM_INDEX)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setQuerySpectrumIndex(@jakarta.annotation.Nonnull Integer querySpectrumIndex) {
    this.querySpectrumIndex = querySpectrumIndex;
  }

  public SpectralLibraryMatch dbName(@jakarta.annotation.Nullable String dbName) {
    
    this.dbName = dbName;
    return this;
  }

  /**
   * Get dbName
   * @return dbName
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_DB_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getDbName() {
    return dbName;
  }


  @JsonProperty(JSON_PROPERTY_DB_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDbName(@jakarta.annotation.Nullable String dbName) {
    this.dbName = dbName;
  }

  public SpectralLibraryMatch dbId(@jakarta.annotation.Nullable String dbId) {
    
    this.dbId = dbId;
    return this;
  }

  /**
   * Get dbId
   * @return dbId
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_DB_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getDbId() {
    return dbId;
  }


  @JsonProperty(JSON_PROPERTY_DB_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDbId(@jakarta.annotation.Nullable String dbId) {
    this.dbId = dbId;
  }

  public SpectralLibraryMatch uuid(@jakarta.annotation.Nonnull Long uuid) {
    
    this.uuid = uuid;
    return this;
  }

  /**
   * Get uuid
   * @return uuid
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_UUID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Long getUuid() {
    return uuid;
  }


  @JsonProperty(JSON_PROPERTY_UUID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setUuid(@jakarta.annotation.Nonnull Long uuid) {
    this.uuid = uuid;
  }

  public SpectralLibraryMatch splash(@jakarta.annotation.Nullable String splash) {
    
    this.splash = splash;
    return this;
  }

  /**
   * Get splash
   * @return splash
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SPLASH)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getSplash() {
    return splash;
  }


  @JsonProperty(JSON_PROPERTY_SPLASH)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSplash(@jakarta.annotation.Nullable String splash) {
    this.splash = splash;
  }

  public SpectralLibraryMatch molecularFormula(@jakarta.annotation.Nullable String molecularFormula) {
    
    this.molecularFormula = molecularFormula;
    return this;
  }

  /**
   * Get molecularFormula
   * @return molecularFormula
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MOLECULAR_FORMULA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getMolecularFormula() {
    return molecularFormula;
  }


  @JsonProperty(JSON_PROPERTY_MOLECULAR_FORMULA)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMolecularFormula(@jakarta.annotation.Nullable String molecularFormula) {
    this.molecularFormula = molecularFormula;
  }

  public SpectralLibraryMatch adduct(@jakarta.annotation.Nullable String adduct) {
    
    this.adduct = adduct;
    return this;
  }

  /**
   * Get adduct
   * @return adduct
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ADDUCT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getAdduct() {
    return adduct;
  }


  @JsonProperty(JSON_PROPERTY_ADDUCT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAdduct(@jakarta.annotation.Nullable String adduct) {
    this.adduct = adduct;
  }

  public SpectralLibraryMatch exactMass(@jakarta.annotation.Nullable Double exactMass) {
    
    this.exactMass = exactMass;
    return this;
  }

  /**
   * Get exactMass
   * @return exactMass
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_EXACT_MASS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getExactMass() {
    return exactMass;
  }


  @JsonProperty(JSON_PROPERTY_EXACT_MASS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setExactMass(@jakarta.annotation.Nullable Double exactMass) {
    this.exactMass = exactMass;
  }

  public SpectralLibraryMatch smiles(@jakarta.annotation.Nullable String smiles) {
    
    this.smiles = smiles;
    return this;
  }

  /**
   * Get smiles
   * @return smiles
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SMILES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getSmiles() {
    return smiles;
  }


  @JsonProperty(JSON_PROPERTY_SMILES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSmiles(@jakarta.annotation.Nullable String smiles) {
    this.smiles = smiles;
  }

  public SpectralLibraryMatch type(@jakarta.annotation.Nullable SpectralMatchType type) {
    
    this.type = type;
    return this;
  }

  /**
   * Get type
   * @return type
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public SpectralMatchType getType() {
    return type;
  }


  @JsonProperty(JSON_PROPERTY_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setType(@jakarta.annotation.Nullable SpectralMatchType type) {
    this.type = type;
  }

  public SpectralLibraryMatch inchiKey(@jakarta.annotation.Nonnull String inchiKey) {
    
    this.inchiKey = inchiKey;
    return this;
  }

  /**
   * Get inchiKey
   * @return inchiKey
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_INCHI_KEY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getInchiKey() {
    return inchiKey;
  }


  @JsonProperty(JSON_PROPERTY_INCHI_KEY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setInchiKey(@jakarta.annotation.Nonnull String inchiKey) {
    this.inchiKey = inchiKey;
  }

  public SpectralLibraryMatch referenceSpectrumType(@jakarta.annotation.Nullable SpectrumType referenceSpectrumType) {
    
    this.referenceSpectrumType = referenceSpectrumType;
    return this;
  }

  /**
   * Get referenceSpectrumType
   * @return referenceSpectrumType
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_REFERENCE_SPECTRUM_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public SpectrumType getReferenceSpectrumType() {
    return referenceSpectrumType;
  }


  @JsonProperty(JSON_PROPERTY_REFERENCE_SPECTRUM_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setReferenceSpectrumType(@jakarta.annotation.Nullable SpectrumType referenceSpectrumType) {
    this.referenceSpectrumType = referenceSpectrumType;
  }

  public SpectralLibraryMatch referenceSpectrum(@jakarta.annotation.Nullable BasicSpectrum referenceSpectrum) {
    
    this.referenceSpectrum = referenceSpectrum;
    return this;
  }

  /**
   * Get referenceSpectrum
   * @return referenceSpectrum
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_REFERENCE_SPECTRUM)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public BasicSpectrum getReferenceSpectrum() {
    return referenceSpectrum;
  }


  @JsonProperty(JSON_PROPERTY_REFERENCE_SPECTRUM)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setReferenceSpectrum(@jakarta.annotation.Nullable BasicSpectrum referenceSpectrum) {
    this.referenceSpectrum = referenceSpectrum;
  }

  public SpectralLibraryMatch querySpectrumType(@jakarta.annotation.Nullable SpectrumType querySpectrumType) {
    
    this.querySpectrumType = querySpectrumType;
    return this;
  }

  /**
   * Get querySpectrumType
   * @return querySpectrumType
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_QUERY_SPECTRUM_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public SpectrumType getQuerySpectrumType() {
    return querySpectrumType;
  }


  @JsonProperty(JSON_PROPERTY_QUERY_SPECTRUM_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setQuerySpectrumType(@jakarta.annotation.Nullable SpectrumType querySpectrumType) {
    this.querySpectrumType = querySpectrumType;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SpectralLibraryMatch spectralLibraryMatch = (SpectralLibraryMatch) o;
    return Objects.equals(this.specMatchId, spectralLibraryMatch.specMatchId) &&
        Objects.equals(this.rank, spectralLibraryMatch.rank) &&
        Objects.equals(this.similarity, spectralLibraryMatch.similarity) &&
        Objects.equals(this.sharedPeaks, spectralLibraryMatch.sharedPeaks) &&
        Objects.equals(this.sharedPeakMapping, spectralLibraryMatch.sharedPeakMapping) &&
        Objects.equals(this.querySpectrumIndex, spectralLibraryMatch.querySpectrumIndex) &&
        Objects.equals(this.dbName, spectralLibraryMatch.dbName) &&
        Objects.equals(this.dbId, spectralLibraryMatch.dbId) &&
        Objects.equals(this.uuid, spectralLibraryMatch.uuid) &&
        Objects.equals(this.splash, spectralLibraryMatch.splash) &&
        Objects.equals(this.molecularFormula, spectralLibraryMatch.molecularFormula) &&
        Objects.equals(this.adduct, spectralLibraryMatch.adduct) &&
        Objects.equals(this.exactMass, spectralLibraryMatch.exactMass) &&
        Objects.equals(this.smiles, spectralLibraryMatch.smiles) &&
        Objects.equals(this.type, spectralLibraryMatch.type) &&
        Objects.equals(this.inchiKey, spectralLibraryMatch.inchiKey) &&
        Objects.equals(this.referenceSpectrumType, spectralLibraryMatch.referenceSpectrumType) &&
        Objects.equals(this.referenceSpectrum, spectralLibraryMatch.referenceSpectrum) &&
        Objects.equals(this.querySpectrumType, spectralLibraryMatch.querySpectrumType);
  }

  @Override
  public int hashCode() {
    return Objects.hash(specMatchId, rank, similarity, sharedPeaks, sharedPeakMapping, querySpectrumIndex, dbName, dbId, uuid, splash, molecularFormula, adduct, exactMass, smiles, type, inchiKey, referenceSpectrumType, referenceSpectrum, querySpectrumType);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SpectralLibraryMatch {\n");
    sb.append("    specMatchId: ").append(toIndentedString(specMatchId)).append("\n");
    sb.append("    rank: ").append(toIndentedString(rank)).append("\n");
    sb.append("    similarity: ").append(toIndentedString(similarity)).append("\n");
    sb.append("    sharedPeaks: ").append(toIndentedString(sharedPeaks)).append("\n");
    sb.append("    sharedPeakMapping: ").append(toIndentedString(sharedPeakMapping)).append("\n");
    sb.append("    querySpectrumIndex: ").append(toIndentedString(querySpectrumIndex)).append("\n");
    sb.append("    dbName: ").append(toIndentedString(dbName)).append("\n");
    sb.append("    dbId: ").append(toIndentedString(dbId)).append("\n");
    sb.append("    uuid: ").append(toIndentedString(uuid)).append("\n");
    sb.append("    splash: ").append(toIndentedString(splash)).append("\n");
    sb.append("    molecularFormula: ").append(toIndentedString(molecularFormula)).append("\n");
    sb.append("    adduct: ").append(toIndentedString(adduct)).append("\n");
    sb.append("    exactMass: ").append(toIndentedString(exactMass)).append("\n");
    sb.append("    smiles: ").append(toIndentedString(smiles)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    inchiKey: ").append(toIndentedString(inchiKey)).append("\n");
    sb.append("    referenceSpectrumType: ").append(toIndentedString(referenceSpectrumType)).append("\n");
    sb.append("    referenceSpectrum: ").append(toIndentedString(referenceSpectrum)).append("\n");
    sb.append("    querySpectrumType: ").append(toIndentedString(querySpectrumType)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

